package com.qike.duola.config;

/**
 * @program: baoxiu
 * @author: Eric
 * @create: 2020-05-31 14:57
 */

import com.qike.duola.service.DuolaTransOrderService;
//import com.qike.duola.socket.NewTransOrderSocket;
import com.qike.duola.socket.NewTransOrderSocket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @author Gjing
 **/
@Configuration
public class WebsocketConfiguration {

    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

    @Autowired
    public  void setDuolaTransOrderService(DuolaTransOrderService duolaTransOrderService){
        NewTransOrderSocket.transOrderService = duolaTransOrderService;
    }
}
